package xin.marcher.module.comment.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import xin.marcher.module.comment.domain.dto.SkuWaitCommentDTO;
import xin.marcher.module.comment.domain.dto.SkuWaitCommentResultDTO;
import xin.marcher.module.comment.domain.request.QuerySkuWaitCommentPageRequest;
import xin.marcher.module.comment.domain.request.SkuWaitCommentRequst;
import xin.marcher.module.comment.repository.SkuCommentRepository;
import xin.marcher.module.comment.service.SkuWaitCommentService;
import xin.marcher.module.common.core.PageResult;

/**
 * 商品待评价信息
 */
@Service
public class SkuWaitCommentServiceImpl implements SkuWaitCommentService {

    @Autowired
    private SkuCommentRepository skuCommentRepository;

    /**
     * 保存待评价信息接口
     */
    @Override
    public SkuWaitCommentResultDTO saveWaitComment(SkuWaitCommentRequst request) {
        return skuCommentRepository.saveWaitComment(request);
    }

    /**
     * 查询用户的商品待评价列表接口
     */
    @Override
    public PageResult<SkuWaitCommentDTO> listWaitCommentPage(QuerySkuWaitCommentPageRequest request) {
        return skuCommentRepository.listWaitCommentPage(request);
    }
}
